Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for PortMidi input #17

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open

Conversation

giulioz
Copy link
Contributor

@giulioz giulioz commented Apr 3, 2024

I've added support for using the PortMidi library instead of RtMidi, as it can present itself as a virtual midi port, useful when using it with a DAW.

image

@Falcosoft
Copy link
Contributor

Hi,
It seems that your solution is not fully cross-platform since on Windows the function Pm_CreateVirtualInput() you use to create virtual Midi-In port is not supported:

Virtual devices are not supported by Windows (Multimedia API). Calls on Windows do nothing except return pmNotImplemented

https://portmidi.github.io/portmidi_docs/group__grp__device.html#gaf262cf560e105c9a44f7b30eb868951e

So it seems the latest Midi-In port related commit from Nukeykt should work better overall:
1130e05

@giulioz
Copy link
Contributor Author

giulioz commented Apr 4, 2024

True, my PR is mostly Mac focused, maybe i can keep the two and make it a flat during compilation with Claire cmake?

@Falcosoft
Copy link
Contributor

Falcosoft commented Apr 4, 2024

True, my PR is mostly Mac focused, maybe i can keep the two and make it a flat during compilation with Claire cmake?

It seems portMidi also supports opening existing Midi In ports the same way as RtMidi does so a run-time check for failing Pm_CreateVirtualInput() call should be enough. In case of a failing call it should open an existing Midi In port (port number can be read from the command line as in latest main branch or from a config file).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants